package com.tpc.control.jpa;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * PlantColumnId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class PlantColumnId implements java.io.Serializable {

	// Fields

	private String plant;
	private String colName;

	// Constructors

	/** default constructor */
	public PlantColumnId() {
	}

	/** full constructor */
	public PlantColumnId(String plant, String colName) {
		this.plant = plant;
		this.colName = colName;
	}

	// Property accessors

	@Column(name = "plant", nullable = false, length = 4)
	public String getPlant() {
		return this.plant;
	}

	public void setPlant(String plant) {
		this.plant = plant;
	}

	@Column(name = "col_name", nullable = false, length = 20)
	public String getColName() {
		return this.colName;
	}

	public void setColName(String colName) {
		this.colName = colName;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof PlantColumnId))
			return false;
		PlantColumnId castOther = (PlantColumnId) other;

		return ((this.getPlant() == castOther.getPlant()) || (this.getPlant() != null
				&& castOther.getPlant() != null && this.getPlant().equals(
				castOther.getPlant())))
				&& ((this.getColName() == castOther.getColName()) || (this
						.getColName() != null
						&& castOther.getColName() != null && this.getColName()
						.equals(castOther.getColName())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getPlant() == null ? 0 : this.getPlant().hashCode());
		result = 37 * result
				+ (getColName() == null ? 0 : this.getColName().hashCode());
		return result;
	}

}